<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
这是没有标签的文本
<span id="span1">这是body中的span</span>
<script>
    console.log(document);
    console.log(document.nodeName)
    console.log(document.nodeType)
    console.log(document.nodeValue)
    console.log(document.body);
    console.log(document.body.nodeName)
    console.log(document.body.nodeType)
    console.log(document.body.nodeValue)
    // 如上document的第一个子节点
    console.log(document.body.firstChild.nodeType)
    console.log(document.body.lastChild)

    console.log(document.getElementById("span1").lastChild);
    console.log(document.getElementById("span1").parentNode);
    console.log(document.getElementById("span1").ownerDocument);

    console.log(document.parentNode);
    console.log(document.ownerDocument);
</script>
</body>
</html>